$(function () {
    $('.btn-delete').click(function () {
        var url=$(this).data('url')
        Swal.fire({
            title: '你认真的?',
            text: "删除此条数据!",
            icon: 'warning',
            showCancelButton: true,
            confirmButtonColor: '#3085d6',
            cancelButtonColor: '#d33',
            confirmButtonText: '确定',
            cancelButtonText: '取消'
        }).then((result) => {
            if(result.value) {
                // 点了确定做什么，由开发者决定
                location.href=url;
            }
        });
    })
})
